package com.cdd.index.controller;

import com.cdd.index.service.IZoneGoodsService;
import com.common.entity.ZoneGoods;
import com.common.untils.CommonResult;
import com.common.vo.ShopVo;
import io.swagger.models.auth.In;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;

import java.util.Map;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author lzl
 * @since 2022-09-09
 */
@RestController
@RequestMapping("/index/zoneGoods")
public class ZoneGoodsController {

    @Autowired
    private IZoneGoodsService iZoneGoodsService;

    @PostMapping("getAllDetail/{currentPage}/{pageSize}")
    public CommonResult getAllDetail(@PathVariable Integer currentPage,@PathVariable Integer pageSize,@RequestBody ZoneGoods zoneGoods){
        return iZoneGoodsService.getAllDetails(currentPage,pageSize,zoneGoods);
    }
    @PostMapping("addZoneGoods/{zoneId}/{id}/{ids}")
    public CommonResult addZoneGoods(@PathVariable String zoneId,@PathVariable String id,@PathVariable String ids){
        return iZoneGoodsService.addZoneGoods(zoneId,id,ids);
    }
    @PostMapping("/deleteZoneGoods/{id}")
    public CommonResult deleteZoneGoods(@PathVariable String id){
        return iZoneGoodsService.deleteZoneGoods(id);
    }



}
